<admintpl file="header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<php>
				$pending  = $status =='pending'  ? 'class  = "active" ': 'class= "" ';
				$approved = $status =='approved' ? 'class  = "active" ': 'class= "" ';
				$rebut    = $status =='rebut'    ? 'class  = "active" ': 'class= "" ';
			</php>
			<li {$pending}><a href="{:U('AdminVerify/applyList',array('status'=>'pending'))}">未审核</a></li>
			<li {$approved}><a href="{:U('AdminVerify/applyList',array('status'=>'approved'))}" target="">已审核</a></li>
			<li {$rebut}><a href="{:U('AdminVerify/applyList',array('status'=>'rebut'))}" target="">已驳回</a></li>
		</ul>
		<form class="well form-search" method="post" action="">
			<input type="text" name="user_id" style="width: 200px;" value="{$search['user_id']}" placeholder="用户iD...">
			<input type="text" name="type_name" style="width: 200px;" value="{$search['type_name']}" placeholder="认证类型...">
			<input type="submit" class="btn btn-primary" value="搜索">
		</form>
		
		<form method="post" class="js-ajax-form" action="">
			<div class="table-actions">
				<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('AdminVerify/indexBat','type = order')}">排序</button>
				<!--<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('AdminVerify/indexBat','type = delete')}">删除</button>-->
			</div>
			<table class="table table-hover table-bordered table-list">
				<thead>
				<tr>
					<th width="16"><label><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"></label></th>
					<th width="20">排序</th>
					<th>用户ID</th>
					<th>认证名称</th>
					<th>认证类型</th>
					<th>职称/称号/营业执照</th>
					<th>手持身份证</th>
					<th>身份证正面</th>
					<!--<th>证件4</th>-->
					<th>申请时间</th>
					<th>审核状态</th>
					<th>操作</th>
				</tr>
				</thead>
				<tbody>
				<volist name="list" id="vo">
					<tr>
						<td style="vertical-align:middle;"><input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]" value="{$vo['apply_id']}">
						</td>
						<td style="vertical-align:middle;"><input name="orderby[{$vo['apply_id']}]" class="input input-order" type="text" size="2" value="{$vo['orderby']}"></td>
						<td style="vertical-align:middle;">{$vo.user_id}</td>
						<td style="vertical-align:middle;">{$vo.apply_name}</td>
						<php>
							$type=array(
								1 => '个人',
								2 => '机构',
								3 => '主持人'
							);
						</php>
						<td style="vertical-align:middle;">{$type[$vo['type']]}</td>
						<td style="vertical-align:middle;"><img style="width:80px;height:80px;" src="{:sp_get_image_preview_url($vo['multiclass_photo'])}" alt="职称/称号/营业执照" onclick="parent.image_preview_dialog(this.src);" /></td>
						<td style="vertical-align:middle;"><img style="width:80px;height:80px;" src="{:sp_get_image_preview_url($vo['handheld_photo'])}" alt="手持身份证" onclick="parent.image_preview_dialog(this.src);" /></td>
						<td style="vertical-align:middle;"><img style="width:80px;height:80px;" src="{:sp_get_image_preview_url($vo['identity_photo'])}" alt="身份证正面" onclick="parent.image_preview_dialog(this.src);" /></td>
						<!--<td style="vertical-align:middle;"><img style="width:80px;height:80px;" src="{:sp_get_image_preview_url($vo['credential4'])}" alt="证件4" onclick="parent.image_preview_dialog(this.src);" /></td>-->
						<td style="vertical-align:middle;">{$vo.apply_time|date='Y-m-d H:i:s',###}</td>
						<php>
							$status=array(
								0 => '未审核',
								1 => '已审核',
								2 => '已驳回'
							);
						</php>
						<td style="vertical-align:middle;">{$status[$vo[approved]]}</td>
						<td style="vertical-align:middle;">
							<if condition="$vo['approved'] eq 0">
								<a  href="{:U('AdminVerify/audit',array('apply_id'=>$vo['apply_id'],'user_id'=>$vo['user_id']))}" data-toggle="tooltip" title="" class="btn btn-primary" data-original-title="审核"> <i class="fa fa-eye"> </i> </a>
								<a  href="{:U('AdminVerify/detail',array('apply_id'=>$vo['apply_id']))}" data-toggle="tooltip" title="" class="btn btn-primary" data-original-title="查看"> <i class="fa fa-pencil"> </i> </a>
							<!--<a href="{:U('AdminVerify/delete',array('apply_id'=>$vo['apply_id']))}" data-toggle="tooltip" title="" class="btn btn-danger js-ajax-delete" data-original-title="删除" > <i class="fa fa fa-trash-o"> </i> </a>-->
								<a href="javacript:;" data-toggle="tooltip" title="" class="btn btn-danger send-message" data-original-title="驳回" data_url="{:U('AdminVerify/rebut',array('apply_id'=>$vo['apply_id']))}"> <i class="fa fa-remove"> </i> </a>
							<elseif condition = "$vo['approved'] eq 1" />
								<a  href="{:U('AdminVerify/detail',array('apply_id'=>$vo['apply_id']))}" data-toggle="tooltip" title="" class="btn btn-primary" data-original-title="查看"> <i class="fa fa-pencil"> </i> </a>
							<else />
								<a  href="{:U('AdminVerify/detail',array('apply_id'=>$vo['apply_id']))}" data-toggle="tooltip" title="" class="btn btn-primary" data-original-title="查看"> <i class="fa fa-pencil"> </i> </a>
							</if>
						</td>
					</tr>
				</volist>
				</tbody>
				<tfoot>
				<tr>
					<th width="16"><label><input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x"></label></th>
					<th width="20">排序</th>
					<th>用户ID</th>
					<th>认证名称</th>
					<th>认证类型</th>
					<th>职称/称号/营业执照</th>
					<th>手持身份证</th>
					<th>身份证正面</th>
					<!--<th>证件4</th>-->
					<th>申请时间</th>
					<th>审核状态</th>
					<th>操作</th>
				</tr>
				</tfoot>
			</table>
			<div class="table-actions">
				<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('AdminVerify/indexBat','type = order')}">排序</button>
				<!--<button class="btn btn-primary btn-small js-ajax-submit" type="submit" data-action="{:U('AdminVerify/indexBat','type = delete')}">删除</button>-->
			</div>
			<div class="pagination">{$page}</div>
		</form>
	</div>
<script src="__PUBLIC__/js/common.js"></script>
	<script>
        $('.send-message').click(function () {
           var  url = $(this).attr('data_url');
	        open_iframe_layer(url,'驳回原因',{
	            area : ['50%','60%'],
	            end : function(){
	                if(typeof(rsatest) != 'undefined' && rsatest == true){
                        location.reload();
                        rsatest = false;
	                }
	            }
	        });
        });
	</script>
</body>
</html>